module.exports = {
  apps: [{
    name: 'demo1',
    script: '/usr/bin/node /home/szh/pm2/demo1.js',
    cwd: '/home/szh/pm2/',
    watch: false,
    exec_mode: 'fork',
    out_file: '/dev/null',
    error_file: "/home/szh/pm2/demo1-error.log",
  },
  {
    name: 'demo2',
    script: '/usr/bin/php /home/szh/pm2/demo2.php',
    cwd: '/home/szh/pm2/',
    watch: false,
    exec_mode: 'fork',
    out_file: '/dev/null',
    error_file: "/home/szh/pm2/demo2-error.log",
  }
  ],

  deploy: {
    production: {
      user: 'SSH_USERNAME',
      host: 'SSH_HOSTMACHINE',
      ref: 'origin/master',
      repo: 'GIT_REPOSITORY',
      path: 'DESTINATION_PATH',
      'pre-deploy-local': '',
      'post-deploy': 'npm install && pm2 reload ecosystem.config.js --env production',
      'pre-setup': ''
    }
  }
};
